package tt.dz.order.schedulingjob;

import java.util.ArrayList;
import java.util.List;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.ContextLoader;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import tt.dz.order.pojo.OrderAccountingStatus;
import tt.dz.order.pojo.OrderAlreadyPaid;
import tt.dz.order.pojo.OrderInfo;
import tt.dz.order.pojo.OrderItemDividedDetail;
import tt.dz.order.service.rpc.client.MsRpcClient;
import tt.dz.order.util.OrderConstant.DividedFlag;
import tt.dz.order.util.OrderConstant.OrderPayStatus;
import tt.dz.order.util.OrderConstant.OrderPayWay;
import tt.dz.order.util.OrderConstant.OrderType;
import tt.dz.order.vo.AccountingInfo;
import tt.dz.order.vo.AccountingInfo.SubItem;

/**
 * @Title 定时统计运营商当日金额
 * @author zhoutian   
 * @date 2015-11-17
 */
@Component
public class StatisticsJob extends QuartzJobBean {
	private static Logger log = LoggerFactory.getLogger(StatisticsJob.class);
	

	@Override
	@Transactional(propagation=Propagation.REQUIRED, rollbackFor=java.lang.Exception.class)
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		log.info("定时统计运营商当日金额 start");
		OrderAlreadyPaid.statistics();
	}
}
